﻿using ET_DbCommon.Model;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ET_DbCommon.DAL
{
    public static class OperatedLogDAL
    {
        /// <summary>
        /// 写入操作日志
        /// </summary>
        /// <param name="operatedlogModel"></param>
        /// <returns></returns>
        public static Task InserToOperatedLog(OperatedLogModel operatedlogModel)
        {
            try
            {
                using (var conn = MySqlHelper.GetConnection())
                {
                    MySQLExt.InsertIdentity<OperatedLogModel>(conn, operatedlogModel);
                }
                return Task.CompletedTask;
            }
            catch (Exception ex)
            {
                return Task.FromException(ex);
            }
        }
    }
}
